package com.maozw.feign.server;

import com.maozw.feign.domain.User;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;


/**
 * 使用@FeignClient("microservice-provider-user")注解绑定provider-user服务，还可以使用url参数指定一个URL。
 * @author MAOZW
 * @Description: ${FeignController}
 * @date 2018/8/9 11:20
 */
@FeignClient(name = "provider-user")
public interface UserFeignClient {
    @RequestMapping("/{id}")
    User findByIdFeign(@RequestParam("id") Long id);
}
